package com.ckzp.jfinal.system.task;

import com.ckzp.jfinal.plugins.cron4j.MyTask;
import com.ckzp.jfinal.system.util.SysTaskUtil;
import com.ckzp.jfinal.system.util.SysWorkLogUtil;
import com.jfinal.core.Controller;
import com.jfinal.plugin.cron4j.ITask;
import org.apache.log4j.Logger;


/**
 * Created by 51594 on 2022/10/12.
 */
public class SysWorkLogTask extends Controller implements ITask, MyTask {

    //log
    private static final Logger log = Logger.getLogger(SysWorkLogTask.class);

    private String name = "";
    private boolean logs = false;


    public void setLog(boolean log) {
        logs = log;
    }

    public void setName(String names) {
        name = names;
    }

    @Override
    public void run() {
        SysTaskUtil.n().updateLastAction(name);
        SysWorkLogUtil.n().scyWorkLog();
    }

    @Override
    public void stop() {
    }

}
